<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<jsp:include page="/include/common_page_pre_part.jsp"></jsp:include>
<link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/css/category.css" />
<script type="text/javascript" src="<%=request.getContextPath()%>/js/category.js">
</script>
<script type="text/javascript">
<!--
 category_url = "<%=request.getContextPath()%>/categories.do";
//-->
</script>
<div class="area_title">
	类别选择
</div>
<form action="<%=request.getContextPath()%>/<s:property value="target"/>" method="post">
	<s:if test="product!=null">
		<div>
			<s:hidden name="id" value="%{product.id}" />
			修改商品/服务：
			<s:property value="product.name" />
			<script type="text/javascript">
		<!--
		$(document).ready(function () {
			<s:set name="preId" value=""/>
			<s:iterator value="product.category.chainIds" status="status">
				<s:if test="#status.first">
					category.load(<s:property value="#status.index+1"/>,null,"<s:property value="top"/>");
				</s:if>
				<s:else>
					category.load(<s:property value="#status.index+1"/>,"id=<s:property value="#preId"/>","<s:property value="top"/>");
				</s:else>
				<s:set name="preId" value="top"/>
			</s:iterator>
		});
		//-->
		</script>
		</div>
	</s:if>
	<s:else>
		<script type="text/javascript">
		<!--
		$(document).ready(function () {
			category.load(1);
		});
		//-->
		</script>
	</s:else>

	<div id="container" >
		<div id="cascadeList">
			<ol>
			</ol>
		</div>
		<div style="clear: both; margin: 5px;">
			<input type="hidden" name="categoryId" id="categoryId" />
			当前选择类别:
			<span id="showContainer" class="show_selected"></span>
		</div>
		<div>
			<input type="submit" class="btn_yellow_2" id="submit_selected" value="确定" />
		</div>
	</div>
</form>

<jsp:include page="/include/common_page_last_part.jsp"></jsp:include>